import java.net.URLEncoder;

/**
 * Created by zhongwei on 2017/1/29.
 */
public class TestTEst {

    public static void main(String[] args) {
        // :  ,  /
        // cdr%3A1%2Ccd_min%3A12%2F11%2F2014%2Ccd_max%3A6%2F11%2F2015
        // cdr%3A1%2Ccd_min%3A1%2F1%2F2017%2Ccd_max%3A1%2F29%2F2017
        // cdr:1,    cd_min:12/11/2014,cd_max:6/11/2015
        // : :: %2C
        // , :: %3A
        // / :: %2F
        // AAR&safe=strict&source=lnt&tbs=cdr%3A1%2Ccd_min%3A1%2F5%2F2017%2Ccd_max%3A1%2F24%2F2017&tbm=nws
        // [HOST]AAR&safe=strict&tbs=cdr:1,cd_min:28/3/2004,cd_max:3/4/2004&tbm=nws


        // cdr%2C1%3Acd_min%2C3%2F21%2F2004%3Acd_max%2C3%2F27%2F2004
        // cdr%3A1%2Ccd_min%3A1%2F1%2F2017%2Ccd_max%3A1%2F29%2F2017
        System.out.println("[HOST]AAR&safe=strict&tbs=cdr:1,cd_min:3/21/2004,cd_max:3/27/2004&tbm=nws".replaceAll(":", "%3A").replaceAll(",", "%2C").replaceAll("/", "%2F"));
        System.out.println(URLEncoder.encode(","));
        System.out.println(URLEncoder.encode(":"));
        System.out.println(URLEncoder.encode("/"));
    }
}
